#ifndef COMMON_INPUT_H
#define COMMON_INPUT_H


#ifdef ENGINE_SDL
#include "myinput_keys_sdl.h"
#endif

#ifdef ENGINE_GLFW
#include "myinput_keys_glfw.h"
#endif


//
//state
//

struct KeyboardState
{
	KeyboardState() { flush(); }

	int key[KEY_COUNT];
	int keyPressed[KEY_COUNT];
	int keyReleased[KEY_COUNT];
	char keyChar;
	//funcs
	void flush();
	void reset();
};

struct MouseState
{
	MouseState() { flush(); }

	int x;
	int y;
	int wheel;
	int deltaX;
	int deltaY;
	int deltaWheel;
	int button[MOUSE_COUNT];
	int buttonPressed[MOUSE_COUNT];
	int buttonReleased[MOUSE_COUNT];
	//funcs
	void flush();
	void reset();
};


struct JoyState
{
	JoyState() { flush(); }

	float axisX;
	float axisY;
	int button[32];
	//funcs
	void flush();
};


#endif // COMMON_INPUT_H
